package com.dhcc.sds.base.dao;

import com.dhcc.cdc.busi.entity.*;
import com.dhcc.sds.standard.dto.CdcExaminateDto;
import com.dhcc.sds.standard.dto.CdcLisReportDto;
import com.dhcc.sds.standard.dto.CdcOrdmastDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 函数用数据中心取值接口
 *
 * @ClassName: SdsExpressMapper
 * @Description: TODO
 * @author sunyingjie
 * @date 2021-05-22 10:10:53
 */
public interface SdsFunctionMapper {
    Map<String, Object> getPatientInfo(@Param("episodeId") Long episodeId);
    List<Map<String, Object>> getOrdExecList(@Param("map") Map<String, Object> map);
    List<Map<String, Object>> getExamResultList(@Param("episodeId")Long episodeId, @Param("risitemId")Long risitemId, @Param("sqlStr")String sqlStr);
    List<Map<String, Object>> getLabReportList(@Param("episodeId")Long episodeId, @Param("labitemId")Long labitemId, @Param("lisMatchList")List<Long> lisMatchList, @Param("sqlStr")String sqlStr);
    List<Map<String, Object>> getOperList(@Param("map") Map<String, Object> map);
    Map<String, Object> getDiagByCode(@Param("map") Map<String, Object> map);
    Map<String, Object> getFeeByType(@Param("map") Map<String, Object> map);
    String getSignByCode(@Param("map") Map<String, Object> map);
    List<CdcSignEntity> getSignByCodeLike(@Param("map") Map<String, Object> map);
    List<Long> getRisLinkOrdMthId(@Param("map") Map<String, Object> map);
    List<Long> getRisLinkExamId(@Param("map") Map<String, Object> map);
    List<Long> getLisLinkOrdMthId(@Param("map") Map<String, Object> map);
    List<Long> getLisLinkExamId(@Param("map") Map<String, Object> map);
    Map<String, Object> getMatchKey(@Param("dicDesc") String dicDesc);
    List<Map<String, Object>> getOrdExecByDesc(@Param("map") Map<String, Object> map);

    List<Map<String, Object>> getExaminateInfo(@Param("ordexecId") Long ordexecId, @Param("episodeId") Long episodeId, @Param("sqlStr") String sqlStr);

    List<Map<String, Object>> getLabReportInfo(@Param("labVisitId") Long labVisitId, @Param("episodeId") Long episodeId, @Param("sqlStr") String sqlStr);

    List<Long> getOrdMast(@Param("map") Map<String, Object> map);

    List<Map<String, Object>> selectOrdExec(@Param("episodeId")Long episodeId, @Param("ordMastId")Long ordMastId, @Param("ordMastList")List<Long> ordMastList, @Param("sqlStr")String sqlStr);

    List<Map<String, Object>> selectExaminate(@Param("episodeId")Long episodeId, @Param("ordMastId")Long ordMastId, @Param("ordMastList")List<Long> ordMastList, @Param("sqlStr")String sqlStr);

    List<Map<String, Object>> selectLabReport(@Param("episodeId")Long episodeId, @Param("laborderId")Long laborderId, @Param("ordMastList")List<Long> ordMastList, @Param("sqlStr")String sqlStr);

    List<Long> getOrdMastByDicId(@Param("id") Long id);

    List<Long> getOrdMastByKeyword(@Param("keywordStr") String keywordStr, @Param("filterStr") String filterStr);
    List<Long> getLabOrdByKeyword(@Param("keywordStr") String keywordStr, @Param("filterStr") String filterStr);
    List<Long> getLabItemByKeyword(@Param("keywordStr") String keywordStr, @Param("filterStr") String filterStr);

    List<Map<String, Object>> selectOutOrdExec(@Param("episodeId")Long episodeId, @Param("ordMastId")Long ordMastId, @Param("ordMastList") List<Long> ordMastList, @Param("orderPriorityId")Long orderPriorityId);

    List<CdcDiagnosisEntity> selectDiagnosisInfoByParam(@Param("episodeId")Long episodeId, @Param("diagSourceId")Long diagSourceId, @Param("mapParam")Map<String, String> mapParam);

    List<CdcBsEmrStructEntity> selectEmrStructInfoByParam(@Param("episodeId") Long episodeId, @Param("subTitles") List<String> subTitles);
    List<CdcBsEmrStructEntity> selectEmrNlpResult(@Param("episodeId") Long episodeId, @Param("subTitle") String subTitle);

    String selectEprBaseInfo(@Param("episodeId") Long episodeId, @Param("sourceCode") String sourceCode);

    List<CdcSurgeryEntity> selectSurgeryInfoByParam(@Param("episodeId") Long episodeId, @Param("surgSourceId") Long surgSourceId, @Param("mapParam") Map<String, String> mapParam);

    List<Map<String, Object>> selectLabVisit(@Param("episodeId") Long episodeId, @Param("labIds") List<Long> labIds,@Param("sqlStr") String sqlStr);

    CdcEpisodeEntity selectAdmLocInfoByParam(@Param("episodeId")Long episodeId, @Param("mapParam") Map<String, String> mapParam);

    List<CdcTransferEntity> selectTransferLocInfoByParam(@Param("episodeId") Long episodeId, @Param("mapParam") Map<String, String> mapParam);
    List<Map<String, Object>> selectEmrList(@Param("map") Map<String, Object> map, @Param("sqlStr")String sqlStr);

    List<CdcOrdmastDto> selectOriginalOrdExec(@Param("episodeId")Long episodeId, @Param("ordMastId")Long ordMastId, @Param("ordMastList")List<Long> ordMastList, @Param("sqlStr")String sqlStr);

    List<CdcLisReportDto> selectOriginalLisReport(@Param("episodeId")Long episodeId, @Param("laborderId")Long laborderId, @Param("ordMastList")List<Long> ordMastList, @Param("sqlStr")String sqlStr);

    List<CdcLisReportDto> selectOriginalLisResult(@Param("episodeId")Long episodeId, @Param("labitemId")Long labitemId, @Param("lisMatchList")List<Long> lisMatchList, @Param("sqlStr")String sqlStr);

    List<CdcLisReportDto> selectOriginalLisResultByReportId(@Param("reportId") Long reportId);

    List<CdcExaminateDto> selectOriginalExaminate(@Param("episodeId")Long episodeId, @Param("ordMastId")Long ordMastId, @Param("ordMastList")List<Long> ordMastList, @Param("sqlStr")String sqlStr);

    String selectEprBaseInfoObjectId(@Param("episodeId") Long episodeId, @Param("sourceCode") String sourceCode);

    String getSignByCodeObjectId(@Param("map") Map<String, Object> map);

    List<Map<String, Object>> selectNurRecord(@Param("map") Map<String, Object> map);
}
